package com.example.config;

import javax.sql.DataSource;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import com.alibaba.druid.pool.DruidDataSource;

@Configuration
@PropertySource("classpath:jdbc.properties")
public class JdbcConfig {
	
	@Value("${jdbc.driverClassName}")
	private String driverClassName;
	
	@Value("${jdbc.url}")
	private String url;
	
	@Value("${jdbc.userName}")
	private String userName;
	
	@Value("${jdbc.password}")
	private String password;
	
	//@Bean
	/*
	 * public DataSource dataSource() { DruidDataSource dataSource = new
	 * DruidDataSource(); dataSource.setDriverClassName(driverClassName);
	 * dataSource.setUrl(url); dataSource.setUsername(userName);
	 * dataSource.setPassword(password); return dataSource; }
	 */

}
